// 封装所有和用户相关的接口函数
import request from '@/utils/http'

export const loginAPI = ({ account, password }) => {
    return request({
        url: '/login',
        method: 'post',
        data: {
            account,
            password
        }
    })
}

/**
 * 猜你喜欢
 * @param {*} param0 
 * @returns 
 */
export const getLikeListAPI = ({ limit = 4 }) => {
    return request({
      url:'/goods/relevant',
      params: {
        limit 
      }
    })
}

/**
 * /goods/relevant' 返回格式:
 * {
    "code":"1",
    "msg":"操作成功",
    "result":[
        {
            "id":"4007902",
            "name":"纯棉舒适女童印花荷叶袖小衫90-140cm",
            "desc":"圈圈花图案，拼接大喇叭袖型",
            "price":"139.00",
            "picture":"https://yanxuan-item.nosdn.127.net/11d0160b0a30c344d1b250c3e613fbb7.jpg",
            "orderNum":428
        },
        {
            "id":"4026450",
            "name":"趣味小恐龙绣花，男童灯芯绒衬衫",
            "desc":"趣味小恐龙绣花，满版老虎印花，5色可选",
            "price":"89.00",
            "picture":"https://yanxuan-item.nosdn.127.net/e68d406a58622a8d850de442aacfcf2e.jpg",
            "orderNum":487
        },
        {
            "id":"4023638",
            "name":"抓绒保暖，毛毛虫儿童运动鞋26-30",
            "desc":"宝贝上脚活力出街",
            "price":"109.00",
            "picture":"https://yanxuan-item.nosdn.127.net/d917c92e663c5ed0bb577c7ded73e4ec.png",
            "orderNum":1927
        },
        {
            "id":"4008940",
            "name":"佳钓尼伏魔典藏进口碳素钓鱼竿",
            "desc":"伏魔典藏手杆，超轻超硬进口碳素鲤鱼鲫鱼杆",
            "price":"305.00",
            "picture":"https://yanxuan-item.nosdn.127.net/3ea24817c9eb1fd692f2385ad6b7fb71.png",
            "orderNum":466
        }
    ]
}
 */